package com.kb.enums;

import lombok.Getter;

@Getter
public enum BizCode {
    // 1：3d模型ModelFiles，2：图片Images，3：2D标注图2DAnnotationFiles，4：产品手册DataSheet，5：符号文件Symbols，6：封装FootPrint，0：其他other
    MODEL_FILE("ModelFiles"),
    IMAGE("Images"),
    _2D_ANNO_FILE("2DAnnotationFiles"),
    DATA_SHEET("DataSheets"),
    SYMBOLS("Symbols"),
    FOOT_PRINT("FootPrints"),
    OTHER("Other");


    private final String type;

    BizCode(String type) {
        this.type = type;
    }

    public static boolean checkValid(String type) {
        for (BizCode b : BizCode.values()) {
            if (b.type.equals(type)) {
                return true;
            }
        }
        return false;
    }
}